#include<iostream>
#include<vector>
#include<deque>

using namespace std;

#include"Priority_queue.h"

void test_Priority_queue()
{
	wjz::priority_queue<int> p;
	p.push(1);
	p.push(2);
	p.push(3);
	p.push(4);
	p.push(5);
	p.push(6);
	p.push(7);
	p.push(8);
	p.push(9);

	while (!p.empty())
	{
		cout << p.top() << " ";
		p.pop();
	}
	cout << endl;


	vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	wjz::priority_queue<int> p1(v.begin(), v.end());
	while (!p1.empty())
	{
		cout << p1.top() << " ";
		p1.pop();
	}
	cout << endl;
}

void test_Priority_queue1()
{
	wjz::priority_queue<int, vector<int>, wjz::Less<int>> p;
	p.push(3);
	p.push(7);
	p.push(1);
	p.push(2);
	p.push(5);

	while (!p.empty())
	{
		cout << p.top() << " ";
		p.pop();
	}
	cout << endl;

	wjz::priority_queue<int, vector<int>, wjz::Greater<int>> p1;
	p1.push(3);
	p1.push(7);
	p1.push(1);
	p1.push(2);
	p1.push(5);
	while (!p1.empty())
	{
		cout << p1.top() << " ";
		p1.pop();
	}
	cout << endl;
}

void test_Priority_queue2()
{
	wjz::priority_queue<wjz::Date, vector<wjz::Date>, wjz::Less<wjz::Date>> p;
	p.push(wjz::Date(2025, 9, 10));
	p.push(wjz::Date(2025, 7, 10));
	p.push(wjz::Date(2025, 8, 10));

	while (!p.empty())
	{
		cout << p.top() << " ";
		p.pop();
	}
	cout << endl;
}

int main()
{
	test_Priority_queue2();
	return 0;
}